package com.example.dynamictab;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.fragment.app.Fragment;

public class FragmentTest extends Fragment {

    TextView mTxtNumber;

    int mPosition;
    String mTitle = "";

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = View.inflate(getActivity(), R.layout.fragment_tab, null);

        mPosition = getArguments().getInt("position");
        mTitle = getArguments().getString("title");
        mTxtNumber = (TextView) view.findViewById(R.id.txt_fragment_number);

        mTxtNumber.setText("第" + mPosition + "个fragment==" + mTitle);
        return view;
    }
}
